import { rolelist } from '../../request/api';

export default {
    namespaced: true,
    state: {
        roleList: []
    },
    getters: {
    },
    mutations: {
        changeRoleList(state, data) {
            state.roleList = data;
        },
    },
    actions: {
        getRolelist(context) {
            rolelist().then(res => {
                if (res.code == 200) {
                    context.commit('changeRoleList', res.list);
                }
            })
        }
    },
    modules: {
    }
}